package com.example.springioc;

import com.example.springioc.DI.UserControllerDI2;
import com.example.springioc.DI.UserSet;
import com.example.springioc.DI.UsercontrollerDI;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringIocApplication {

    public static void main(String[] args) {
        ApplicationContext context= SpringApplication.run(SpringIocApplication.class, args);
       /* UserController bean = context.getBean(UserController.class);
        bean.userController();

        UserController bean1 = (UserController) context.getBean("userController");
        bean1.userController();

        UserController bean2 = context.getBean("userController",UserController.class);
        bean2.userController();*/


//        UserService bean = context.getBean(UserService.class);
//        bean.userService();

       /* UserInfo bean = (UserInfo) context.getBean("userInfo");
        System.out.println(bean);*/
       /* UsercontrollerDI userControllerDI = (UsercontrollerDI) context.getBean("usercontrollerDI");
        userControllerDI.start();*/

     /*   UserControllerDI2 userControllerDI2 = context.getBean(UserControllerDI2.class);
        userControllerDI2.start();*/
/*

        UserSet bean = context.getBean(UserSet.class);
        bean.start();
*/
        UserController bean = context.getBean(UserController.class);
        bean.start();

    }
}
